package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 考核-人-状态枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022-11-09
 */
@AllArgsConstructor
@Getter
public enum AssessmentPersonStatusEnum {

    UN_SUBMIT(0, "未提交"),
    ALREADY_SUBMIT(1, "已提交"),
    REMOVE(2, "已作废"),
    SCORE(3, "已打分");

    private Integer code;
    private String desc;

    public static AssessmentPersonStatusEnum getByCode(Integer code) {
        AssessmentPersonStatusEnum[] dehydrationEnums = AssessmentPersonStatusEnum.values();
        for (AssessmentPersonStatusEnum anEnum : dehydrationEnums) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
